package eshin.blog.beans;

import java.text.SimpleDateFormat;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name="dianjiliang")
public class Dianjiliang {
	private int Id;
	private int AId;
	private String ip;
	private Date time;
	@Override
	public String toString() {
		return "Dianjiliang [Id=" + Id + ", AId=" + AId + ", ip=" + ip
				+ ", time=" + time + "]";
	}
	@Id
	@GenericGenerator(name = "generator", strategy = "native")
	@GeneratedValue(generator = "generator")
	@Column(name="Id",unique=true, nullable=false )
	public int getId() {
		return Id;
	}
	public void setId(int id) {
		Id = id;
	}
	public int getAId() {
		return AId;
	}
	public void setAId(int id) {
		AId = id;
	}
	public String getIp() {
		return ip;
	}
	public void setIp(String ip) {
		this.ip = ip;
	}
	public Date getTime() {
		return time;
	}
	public void setTime(Date time) {
		this.time = time;
	}
	
	
}
